from flask import Flask, render_template,session
from flask_session import Session
from flask_sqlalchemy import SQLAlchemy
import redis
from flask_wtf.csrf import CSRFProtect
from flask_script import Manager
from flask_migrate import Migrate,MigrateCommand
from config import Config
from iHome import db,redis_store,create_app,models


app = create_app('development')
manager = Manager(app)
Migrate(app,db)

manager.add_command('db',MigrateCommand)


    # return render_template('temp_01.html')

if __name__ == "__main__":

    # 启动开发web服务器
    # app.url_map: 记录着所有url地址和视图函数之间对应的关系
    # db.drop_all()
    # print(app.url_map)
    manager.run()



